package com.wanxi.dto;

public class StudentTest {
    public static void main(String[] args) {

        Student[] students = new Student[5];
        String[] xingming = {"张三", "李四", "王五", "周六", "周期"};
        int[] ids = {1, 2, 3, 4, 5};

        for (int i = 0; i < students.length; i++) {
            Student student = new Student();
            student.name = xingming[i];
            student.id = ids[i];
            students[i] = student;
        }
        System.out.println(students);
//        Student student1 = students[0];
//        student1.name = "张三";
//        student1.id = 1;
//        Student student2 = students[1];
//        student2.name = "李四";
//        student2.id = 2;
//        Student student3 = students[1];
//        student2.name = "李四";
//        student2.id = 2;
//        Student student4 = students[1];
//        student2.name = "李四";
//        student2.id = 2;
//        Student student5 = students[1];
//        student2.name = "李四";
//        student2.id = 2;
        System.out.println(students[0]);
    }
}
